Skip to content

Comments

Ignore pidfile when running in Docker#1212

Open
jake-low wants to merge 1 commit intomainfrom
jlow/pidfile
Open

Ignore pidfile when running in Docker#1212
jake-low wants to merge 1 commit intomainfrom
jlow/pidfile

Conversation

@jake-low
Copy link
Contributor

The application normally writes the process PID to /MapRouletteAPI/RUNNING_PID, and refuses to start when that file exists (to ensure only a single copy is running at a time).

However, this is annoying when running the backend in a container, where the orchestrator (Docker daemon, Kubernetes, etc) already ensures that only one instance is running per namespace. If the application crashes without cleaning up the RUNNING_PID file, then it will refuse to launch when the orchestrator restarts it. Depending on the deploy configuration, this may require a human to intervene by deleting the container before restarting the service.

To fix this, this PR makes the container image ignore the pidfile by default.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant